import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';

import {UserComponent} from './user/user.component';
import {SharedModule} from '@shared/shared.module';
import {UserEditComponent} from './user/edit/user.edit.component';
import {DataComponent} from './dataexpand/dataexpand.component';

// import { HttpModule } from '@angular/http';
// import { DataexpendService } from './dataexpand/dataexpand.service';

const routes: Routes = [
    {path: 'user', component: UserComponent},
    {path: 'dataexpand', component: DataComponent}
    
];
// tslint:disable-next-line:max-line-length
const COMPONENTS_NOROUNT = [ UserEditComponent, DataComponent];
@NgModule({
    imports: [
        SharedModule, 
        RouterModule.forChild(routes),
    ],
    declarations: [
        UserComponent,
        ...COMPONENTS_NOROUNT
    ],
    exports: [
        RouterModule
    ],
    // providers: [DataexpendService],
    entryComponents: COMPONENTS_NOROUNT
})
export class SysModule {
}
